
#ifndef _MEMBER_BTABLEITEM_H_
#define _MEMBER_BTABLEITEM_H_

#include <BImage>
#include <BImage>
#include <BWidget>
#include <BGridLayout>
#include <BTableItem>
#include <BTableWidget>
#include "member_BTableWidget.h"

#define item_member(item)		((member_BTableItem*)((BTableItem*)item)->_ptr)

namespace BWE
{
	class member_BTableItem
	{
	public:
		member_BTableItem(BTableItem* tableWidgetItem);
		~member_BTableItem();

		BSize sizeHint(const BFont* font);

		void dirtyCell();
		void adjust(int x, int y, int w, int h);

		bool empty() const;
		bool ignored() const;

		bool operator == (const BString& text) const;
		bool operator == (const BWidget* widget) const;
		bool operator == (const BImage* image) const;

		bool operator != (const BString& text) const;
		bool operator != (const BWidget* widget) const;
		bool operator != (const BThing* thing) const;

		BTableItem*			boss;
		BTableWidget*		table;
		Align				align;
		bool				editable;
		bool				lineFeed;
		int					row;
		int					column;
		BImageHolder		image;
		BString				text;
		BColor				color;
		BThingHolder		thing;
		BWidgetHolder		widget;
		BValue				value;
		
		bool				dirty;
		BRect				rect;
		BSize				imageSize;
		BRect				imageRect;
		BRect				textRect;
		BSize				textSize;
	};
}

#endif